package com.example.dynamic.service;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.example.dynamic.mapper.PublicMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Dynamic01Service {

    @Autowired
    private PublicMapper publicMapper;

    public List<String> findAllUser() {
        return publicMapper.findAllUser();
    }

    @DS("dynamic-01")
    public List<String> findAllUserDs() {
        return publicMapper.findAllUser();
    }
}
